import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/emergency/emergency_res_expert_entity.dart';

EmergencyResExpertEntity $EmergencyResExpertEntityFromJson(Map<String, dynamic> json) {
  final EmergencyResExpertEntity emergencyResExpertEntity = EmergencyResExpertEntity();
  final String? affiliatedUnit = jsonConvert.convert<String>(json['affiliatedUnit']);
  if (affiliatedUnit != null) {
    emergencyResExpertEntity.affiliatedUnit = affiliatedUnit;
  }
  final String? annexToTheaAgreement = jsonConvert.convert<String>(json['annexToTheaAgreement']);
  if (annexToTheaAgreement != null) {
    emergencyResExpertEntity.annexToTheaAgreement = annexToTheaAgreement;
  }
  final String? approvalStatus = jsonConvert.convert<String>(json['approvalStatus']);
  if (approvalStatus != null) {
    emergencyResExpertEntity.approvalStatus = approvalStatus;
  }
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    emergencyResExpertEntity.companyCode = companyCode;
  }
  final String? contactInformation = jsonConvert.convert<String>(json['contactInformation']);
  if (contactInformation != null) {
    emergencyResExpertEntity.contactInformation = contactInformation;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    emergencyResExpertEntity.createBy = createBy;
  }
  final String? createById = jsonConvert.convert<String>(json['createById']);
  if (createById != null) {
    emergencyResExpertEntity.createById = createById;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    emergencyResExpertEntity.createDate = createDate;
  }
  final String? dateOfBirth = jsonConvert.convert<String>(json['dateOfBirth']);
  if (dateOfBirth != null) {
    emergencyResExpertEntity.dateOfBirth = dateOfBirth;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    emergencyResExpertEntity.deleted = deleted;
  }
  final String? educationCertificate = jsonConvert.convert<String>(json['educationCertificate']);
  if (educationCertificate != null) {
    emergencyResExpertEntity.educationCertificate = educationCertificate;
  }
  final String? educationalBackground = jsonConvert.convert<String>(json['educationalBackground']);
  if (educationalBackground != null) {
    emergencyResExpertEntity.educationalBackground = educationalBackground;
  }
  final String? educationalBackgroundName = jsonConvert.convert<String>(json['educationalBackgroundName']);
  if (educationalBackgroundName != null) {
    emergencyResExpertEntity.educationalBackgroundName = educationalBackgroundName;
  }
  final String? email = jsonConvert.convert<String>(json['email']);
  if (email != null) {
    emergencyResExpertEntity.email = email;
  }
  final String? expertName = jsonConvert.convert<String>(json['expertName']);
  if (expertName != null) {
    emergencyResExpertEntity.expertName = expertName;
  }
  final String? expertPhotos = jsonConvert.convert<String>(json['expertPhotos']);
  if (expertPhotos != null) {
    emergencyResExpertEntity.expertPhotos = expertPhotos;
  }
  final String? expirationTime = jsonConvert.convert<String>(json['expirationTime']);
  if (expirationTime != null) {
    emergencyResExpertEntity.expirationTime = expirationTime;
  }
  final String? gender = jsonConvert.convert<String>(json['gender']);
  if (gender != null) {
    emergencyResExpertEntity.gender = gender;
  }
  final String? genderName = jsonConvert.convert<String>(json['genderName']);
  if (genderName != null) {
    emergencyResExpertEntity.genderName = genderName;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    emergencyResExpertEntity.id = id;
  }
  final String? listOfOtherFiles = jsonConvert.convert<String>(json['listOfOtherFiles']);
  if (listOfOtherFiles != null) {
    emergencyResExpertEntity.listOfOtherFiles = listOfOtherFiles;
  }
  final List<dynamic>? listOfOtherFilesList = (json['listOfOtherFilesList'] as List<dynamic>?)?.map(
          (e) => e).toList();
  if (listOfOtherFilesList != null) {
    emergencyResExpertEntity.listOfOtherFilesList = listOfOtherFilesList;
  }
  final String? major = jsonConvert.convert<String>(json['major']);
  if (major != null) {
    emergencyResExpertEntity.major = major;
  }
  final String? professionalQualificationCertificate = jsonConvert.convert<String>(json['professionalQualificationCertificate']);
  if (professionalQualificationCertificate != null) {
    emergencyResExpertEntity.professionalQualificationCertificate = professionalQualificationCertificate;
  }
  final String? professionalTitle = jsonConvert.convert<String>(json['professionalTitle']);
  if (professionalTitle != null) {
    emergencyResExpertEntity.professionalTitle = professionalTitle;
  }
  final String? skillsAndExpertise = jsonConvert.convert<String>(json['skillsAndExpertise']);
  if (skillsAndExpertise != null) {
    emergencyResExpertEntity.skillsAndExpertise = skillsAndExpertise;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    emergencyResExpertEntity.updateBy = updateBy;
  }
  final String? updateById = jsonConvert.convert<String>(json['updateById']);
  if (updateById != null) {
    emergencyResExpertEntity.updateById = updateById;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    emergencyResExpertEntity.updateDate = updateDate;
  }
  final String? workExperience = jsonConvert.convert<String>(json['workExperience']);
  if (workExperience != null) {
    emergencyResExpertEntity.workExperience = workExperience;
  }
  final String? estimateName = jsonConvert.convert<String>(json['estimateName']);
  if (estimateName != null) {
    emergencyResExpertEntity.estimateName = estimateName;
  }
  return emergencyResExpertEntity;
}

Map<String, dynamic> $EmergencyResExpertEntityToJson(EmergencyResExpertEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['affiliatedUnit'] = entity.affiliatedUnit;
  data['annexToTheaAgreement'] = entity.annexToTheaAgreement;
  data['approvalStatus'] = entity.approvalStatus;
  data['companyCode'] = entity.companyCode;
  data['contactInformation'] = entity.contactInformation;
  data['createBy'] = entity.createBy;
  data['createById'] = entity.createById;
  data['createDate'] = entity.createDate;
  data['dateOfBirth'] = entity.dateOfBirth;
  data['deleted'] = entity.deleted;
  data['educationCertificate'] = entity.educationCertificate;
  data['educationalBackground'] = entity.educationalBackground;
  data['educationalBackgroundName'] = entity.educationalBackgroundName;
  data['email'] = entity.email;
  data['expertName'] = entity.expertName;
  data['expertPhotos'] = entity.expertPhotos;
  data['expirationTime'] = entity.expirationTime;
  data['gender'] = entity.gender;
  data['genderName'] = entity.genderName;
  data['id'] = entity.id;
  data['listOfOtherFiles'] = entity.listOfOtherFiles;
  data['listOfOtherFilesList'] = entity.listOfOtherFilesList;
  data['major'] = entity.major;
  data['professionalQualificationCertificate'] = entity.professionalQualificationCertificate;
  data['professionalTitle'] = entity.professionalTitle;
  data['skillsAndExpertise'] = entity.skillsAndExpertise;
  data['updateBy'] = entity.updateBy;
  data['updateById'] = entity.updateById;
  data['updateDate'] = entity.updateDate;
  data['workExperience'] = entity.workExperience;
  data['estimateName'] = entity.estimateName;
  return data;
}

extension EmergencyResExpertEntityExtension on EmergencyResExpertEntity {
  EmergencyResExpertEntity copyWith({
    String? affiliatedUnit,
    String? annexToTheaAgreement,
    String? approvalStatus,
    String? companyCode,
    String? contactInformation,
    String? createBy,
    String? createById,
    String? createDate,
    String? dateOfBirth,
    String? deleted,
    String? educationCertificate,
    String? educationalBackground,
    String? educationalBackgroundName,
    String? email,
    String? expertName,
    String? expertPhotos,
    String? expirationTime,
    String? gender,
    String? genderName,
    String? id,
    String? listOfOtherFiles,
    List<dynamic>? listOfOtherFilesList,
    String? major,
    String? professionalQualificationCertificate,
    String? professionalTitle,
    String? skillsAndExpertise,
    String? updateBy,
    String? updateById,
    String? updateDate,
    String? workExperience,
    String? estimateName,
  }) {
    return EmergencyResExpertEntity()
      ..affiliatedUnit = affiliatedUnit ?? this.affiliatedUnit
      ..annexToTheaAgreement = annexToTheaAgreement ?? this.annexToTheaAgreement
      ..approvalStatus = approvalStatus ?? this.approvalStatus
      ..companyCode = companyCode ?? this.companyCode
      ..contactInformation = contactInformation ?? this.contactInformation
      ..createBy = createBy ?? this.createBy
      ..createById = createById ?? this.createById
      ..createDate = createDate ?? this.createDate
      ..dateOfBirth = dateOfBirth ?? this.dateOfBirth
      ..deleted = deleted ?? this.deleted
      ..educationCertificate = educationCertificate ?? this.educationCertificate
      ..educationalBackground = educationalBackground ?? this.educationalBackground
      ..educationalBackgroundName = educationalBackgroundName ?? this.educationalBackgroundName
      ..email = email ?? this.email
      ..expertName = expertName ?? this.expertName
      ..expertPhotos = expertPhotos ?? this.expertPhotos
      ..expirationTime = expirationTime ?? this.expirationTime
      ..gender = gender ?? this.gender
      ..genderName = genderName ?? this.genderName
      ..id = id ?? this.id
      ..listOfOtherFiles = listOfOtherFiles ?? this.listOfOtherFiles
      ..listOfOtherFilesList = listOfOtherFilesList ?? this.listOfOtherFilesList
      ..major = major ?? this.major
      ..professionalQualificationCertificate = professionalQualificationCertificate ?? this.professionalQualificationCertificate
      ..professionalTitle = professionalTitle ?? this.professionalTitle
      ..skillsAndExpertise = skillsAndExpertise ?? this.skillsAndExpertise
      ..updateBy = updateBy ?? this.updateBy
      ..updateById = updateById ?? this.updateById
      ..updateDate = updateDate ?? this.updateDate
      ..workExperience = workExperience ?? this.workExperience
      ..estimateName = estimateName ?? this.estimateName;
  }
}
